ccflags-y += -I$(src) -Wno-int-conversion -Wno-declaration-after-statement

obj-m := ashmem_linux.o
ashmem_linux-y := deps.o ashmem.o

KERNEL_SRC ?= /lib/modules/$(shell uname -r)/build

all:
	$(MAKE) -C $(KERNEL_SRC) V=0 M=$$PWD

modules:
	$(MAKE) -C $(KERNEL_SRC) V=0 M=$$PWD
	
insmod:
	$(shell sudo insmod ashmem_linux.ko)
	$(shell sudo chmod +666 /dev/ashmem)

rmmod:
	sudo rmmod ashmem_linux

clean:
	make -C $(KERNEL_SRC) M=$(PWD) clean

